import base64
import binascii
sha1_hex = "D82FC5F668FB23410FF9E4C5D820D812FDE8D24F".replace(":","")
sha1_bytes = binascii.unhexlify(sha1_hex)
print(base64.b64encode(sha1_bytes).decode())
